#![warn(clippy::all, rust_2018_idioms)]
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]

use ftp_server::FtpApp;

// hide console window on Windows in release


fn main() -> eframe::Result<()> {
    std::env::set_var("RUST_LOG", "debug");
    env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`).
    let native_options = eframe::NativeOptions {
        initial_window_size: Some(egui::Vec2 {
            x: 330.0,
            y: 280.0,
        }),
        max_window_size: Some(egui::Vec2 {
            x: 330.0,
            y: 280.0,
        }),
        resizable: false,
        ..Default::default()
    };


    eframe::run_native(
        "ftp server",
        native_options,
        Box::new(|cc| Box::new(FtpApp::new(cc))),
    )
}
